const express = require("express");

const router = express.Router();

const expressJoi = require("@escook/express-joi");

const {
  getAttributes,
  addAttributes,
  delAttributes,
  getAttribute,
  editAttribute,
} = require("../control/attributes");
// const {} = require("../schema/user");

//参数列表
router.get("/categories/:id/attributes", getAttributes);

//添加动态参数或者静态属性
router.post("/categories/:id/attributes", addAttributes);

//删除参数
router.delete("/categories/:id/attributes/:attrid", delAttributes);

//根据 ID 查询参数
router.get("/categories/:id/attributes/:attrId", getAttribute);

//编辑提交参数
router.put("/categories/:id/attributes/:attrId", editAttribute);

module.exports = router;
